"""app URL Configuration

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/2.2/topics/http/urls/
Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  path('', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  path('', Home.as_view(), name='home')
Including another URLconf
    1. Import the include() function: from django.urls import include, path
    2. Add a URL to urlpatterns:  path('blog/', include('blog.urls'))
"""
from django.contrib import admin
from django.urls import path


from . import urls_shin
from . import urls_member

from . import views
from . import views_upload
from . import views_dashboard

urlpatterns = [
    path('ping', views.pingpong, name='pingpong'),
    # path('sms_send', views.sms_send, name='member_sms_send'),

    path('upload/material/cover', views_upload.MaterialUploadView.as_view({"post": "upload_cover"}), name='upload_cover'),
    path('upload/material/pic', views_upload.MaterialUploadView.as_view({"post": "upload_pic"}), name='upload_pic'),
    path('upload/material/audio', views_upload.MaterialUploadView.as_view({"post": "upload_audio"}), name='upload_audio'),
    path('upload/material/video', views_upload.MaterialUploadView.as_view({"post": "upload_video"}), name='upload_video'),
    path('upload/material/ai_video', views_upload.MaterialUploadView.as_view({"post": "upload_ai_video"}), name='upload_ai_video'),
    path('upload/material/human3d', views_upload.MaterialUploadView.as_view({"post": "upload_vhuman"}), name='upload_vhuman'),
    path('upload/material/model3d', views_upload.MaterialUploadView.as_view({"post": "upload_model3d"}), name='upload_model3d'),

    path('upload/delete_upload_file', views_upload.DeleteFileViewSet.as_view({"post": "delete_upload_file"}), name='delete_upload_file'),
    path('upload/delete_unused_upload_file', views_upload.DeleteFileViewSet.as_view({"post": "delete_unused_upload_file"}), name='delete_unused_upload_file'),

    path('upload/avatar/voicetone', views_upload.AvatarUploadView.as_view({"post": "upload_voicetone"}), name='upload_voicetone'),
    path('upload/vtuber/pic', views_upload.VtuberUploadView.as_view({"post": "upload_vtuber_pic"}), name='upload_vtuber_pic'),
    path('upload/vtuber/video', views_upload.VtuberUploadView.as_view({"post": "upload_vtuber_video"}), name='upload_vtuber_video'),
]

# dashboard
urlpatterns += [
    # path('dashboard/count/cube', views_dashboard.DashboardViewSet.as_view({"post": "count_cube"}), name='count_cube'),
    path('dashboard/count/material', views_dashboard.DashboardViewSet.as_view({"post": "count_material"}), name='count_material'),
    path('dashboard/count/tts', views_dashboard.DashboardViewSet.as_view({"post": "count_tts"}), name='count_tts'),
    path('dashboard/count/aivideo', views_dashboard.DashboardViewSet.as_view({"post": "count_aivideo"}), name='count_aivideo'),
    path('dashboard/group/material', views_dashboard.DashboardViewSet.as_view({"post": "material_group_by_type"}), name='material_group_by_type'),
]

# 加上其它文件的urlpatterns
urlpatterns += urls_member.urlpatterns
urlpatterns += urls_shin.urlpatterns

